package cn.weekdragon.gscore.adapter.model.message;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Message {

    public MessageChain plus(Message message){
        MessageChain chain = new MessageChain();
        chain.setMessageChain(new ArrayList<>());
        chain.plus(this);
        chain.plus(message);
        return chain;
    }

    public MessageChain plus(String message){
        MessageChain chain = new MessageChain();
        chain.setMessageChain(new ArrayList<>());
        chain.plus(this);
        chain.plus(new Plain(message));
        return chain;
    }

    public List<Message> toList(){
        return Arrays.asList(this);
    }

}
